<template>
  <div
    :class="!darkSkin ? 'blogContent' : 'blogContent dark'"
    ref="blogContent"
  >
    <div :class="!darkSkin ? 'paper' : 'paper dark'" ref="paper">
      <p v-html="content" class="main"></p>
    </div>
  </div>
</template>

<script>
export default {
  name: "BlogContent",
  data() {
    return {
      content: `<p>测试</p>`,
    };
  },
  computed: {
    darkSkin() {
      return this.$store.state.darkSkin;
    },
  },
};
</script>

<style scoped>
* {
  box-sizing: border-box;
}
@media screen and (min-width: 1439.98px) {
  .blogContent {
    margin: 0 auto;
    width: 80%;
    height: 1200px;
    padding: 0px 50px;
  }
  .paper {
    padding: 30px 50px;
  }
}
@media screen and (min-width: 1024px) and (max-width: 1439.98px) {
  .blogContent {
    margin: 0 auto;
    width: 80%;
    height: 1200px;
    padding: 0px 30px;
  }
  .paper {
    padding: 30px 50px;
  }
}
@media screen and (min-width: 768px) and (max-width: 1023.98px) {
  .blogContent {
    margin: 0 auto;
    width: 80%;
    height: 1200px;
    padding: 0px 30px;
  }
  .paper {
    padding: 30px 20px;
  }
}
@media screen and (max-width: 767.98px) {
  .blogContent {
    margin: 0 auto;
    width: 80%;
    height: 1200px;
    padding: 0px 5px;
  }
  .paper {
    padding: 20px 20px;
  }
}

.paper {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.27), 0 0 20px rgba(0, 0, 0, 0.1) inset;
}
.paper.dark {
  background-color: #2d2d2d;
  border: 0;
  color: #a9a9b3;
  box-shadow: 0;
  transition: all 0.8s ease;
}

.paper >>> .main p {
  font-size: 1.5rem;
  letter-spacing: 0.4rem;
}
.paper::after,
.paper::before {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 100px;
  height: 1px;
  z-index: -1;
  box-shadow: 0 2px 12px 5px rgba(0, 0, 0, 0.3);
}
.paper::after {
  left: 4px;
  transform: rotate(-6deg);
}
.paper::before {
  right: 4px;
  transform: rotate(6deg);
}
</style>